package openGl.utils;

import android.content.Context;
import android.opengl.GLES20;

import camera.OpenGl.ShaderProgram;
import customview.ike.com.customviewproject.R;

/**
 * Created by Administrator on 2017/12/28.
 */

public class ColorShaderProgram extends ShaderProgram {

    public final int uMatrix;
    public final int aPosition;
    public final int aColor;

    public ColorShaderProgram(Context context) {
        super(context, R.raw.simple_vertex_shader, R.raw.simple_fragment_shader);
        //初始化各个attribute参数的位置
        aColor = GLES20.glGetAttribLocation(program, A_COLOR);
        aPosition = GLES20.glGetAttribLocation(program, A_POSITION);
        //初始化各个Uniform参数的位置
        uMatrix = GLES20.glGetUniformLocation(program, U_MATRIX);
    }
    
}
